package com.broada.apm.utils;

import java.util.Map;
import java.util.concurrent.ConcurrentSkipListMap;

/**
 * 创建一个固定大小的同步队列
 */
public class FixSizeBlockingMapUtils {
    public static <K,T> Map<K,T> create(int max_size) {
        return new ConcurrentSkipListMap<K,T>() {
            /**
			 * 
			 */
			private static final long serialVersionUID = 1L;

			@Override
            public T put(K key, T value) {
                return super.put(key, value);
            }
        };
    }
}
